In product manufacturing process, product testing plays a vital role in enhancing product quality. Often, the product testing stage is required for many existing products. With technology development, an arithmetic logic unit is widely used to help accomplishing many kinds of repetitive and complex computational work, and to relieve people from such computational work, improving quality of life.
In general, an arithmetic logic unit (ALU) includes an adder, a multiplier, a shifter, a logic operation unit and a memory. Currently, the arithmetic logic unit is often tested mainly by the following testing methods:
The main control equipment in the testing process is controlled to provide input data for an arithmetic logic unit under testing and, at the same time, provides an expected-result unit with an expected result which is expected from the arithmetic logic unit after these input data is processed through the arithmetic logic unit.
Then, the arithmetic logic unit outputs an operation result, and the expected result unit outputs the expected result at the same time. The operation result and the expected result are provided for a comparator. A comparison result is obtained after the comparator completes a comparison. The comparison result is either the same or different. When the comparison result is the same, it indicates that the operation result of the arithmetic logic unit is correct; when the comparison result is different, it indicates that the operation result of the arithmetic logic unit is wrong, further indicating that the arithmetic logic unit is disqualified or has low reliability.
Meanwhile, in order to ensure the accuracy and reliability of test results, many rounds of testing are required for the same arithmetic logic unit (the number of testing is often hundreds or thousands). Thus, the expected result unit needs to store expected results from many rounds of testing. Therefore, a very large storage space is needed for the expected result unit. This will certainly make the expected result unit larger and more expensive, and difficult to be integrated with other devices (including the arithmetic logic unit under testing, the main control equipment, etc.). Therefore, the expected result unit cannot benefit from miniaturization and low cost from device integration.